<template>
  <div @click="divfun">
    <a href="https://www.baidu.com" @click.prevent.stop="fun">点击跳转到百度</a>
  </div>
</template>

<script>
export default {
  methods: {
    fun() {
      console.log('点击了链接')
    },
    divfun() {
      console.log('点击div')
    },
  },
}
</script>
